package com.bianmaba.vue.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

@RestController
@RequestMapping("data")
public class DataController {

    @RequestMapping("query")
    public List query() {
        List datas = new ArrayList(0);
        datas.add(new HashMap() {{
            put("title", "name1");
            put("description", "description1");
        }});
        datas.add(new HashMap() {{
            put("title", "name2");
            put("description", "description2");
        }});
        return datas;
    }

}
